package test;

import service.DvdService;

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        DvdService service = new DvdService();
        System.out.println("欢迎使用迷你DVD管理器");
        System.out.println("----------------------");
        label:
        while (true) {
            System.out.println("1.新增DVD");
            System.out.println("2.查看DVD");
            System.out.println("3.删除DVD");
            System.out.println("4.借出DVD");
            System.out.println("5.归还DVD");
            System.out.println("6.退出系统");
            System.out.println("----------------------");
            System.out.println("请选择操作：");
            int i = scanner.nextInt();
            switch (i) {
                case 1:
                    service.saveDvd(scanner);
                    break;
                case 2:
                    service.showDvd(scanner);
                    break;
                case 3:
                    service.deleteDvd(scanner);
                    break;
                case 4:
                    service.lendDvd(scanner);
                    break;
                case 5:
                    service.revestDvd(scanner);
                    break;
                case 6:
                    break label;
            }
        }
    }
}
